

a = [9, 10, 3, 7, 5, 8]
nums = []
n = 0
while n < len(a):
    if a[n] % 2 == 1:
        nums.append(a[n])
    n+=1

print(nums)



# nums = []
# for i in range(len(a)):
#     if a[i]%2==0:
#         nums.append(a[i])
#
# print(nums)


nums = []
for i in a:
    if i % 2 == 0:
        nums.append(i)
print(nums)

